#!/usr/bin/php -d mysqlnd.net_read_timeout=3600
<?php
set_include_path("../../../include");
require("header.inc.php");

$startShard = !empty($argv[1]) ? $argv[1] : 1;
$shardIDs = Zotero_DB::columnQuery("SELECT shardID FROM shards WHERE shardID >= ? ORDER BY shardID", $startShard);

foreach ($shardIDs as $shardID) {
	echo "Shard: $shardID\n";
	
	Zotero_Admin_DB::query("ALTER TABLE `itemAnnotations` CHANGE `type` `type` ENUM( 'highlight', 'note', 'image', 'ink' ) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, CHANGE `position` `position` TEXT CHARACTER SET ascii COLLATE ascii_bin NOT NULL", false, $shardID);
}
